import request from '@/utils/request'

// 查询社区设置列表
export function listCommunity(query) {
  return request({
    url: '/organization/community/list',
    method: 'get',
    params: query
  })
}

// 查询社区设置详细
export function getCommunity(communityId) {
  return request({
    url: '/organization/community/' + communityId,
    method: 'get'
  })
}

// 新增社区设置
export function addCommunity(data) {
  return request({
    url: '/organization/community',
    method: 'post',
    data: data
  })
}

// 修改社区设置
export function updateCommunity(data) {
  return request({
    url: '/organization/community',
    method: 'put',
    data: data
  })
}

// 删除社区设置
export function delCommunity(communityId) {
  return request({
    url: '/organization/community/' + communityId,
    method: 'delete'
  })
}
export function changeCommunityStatus(communityId, status) {
  const data = {
      communityId,
        status
  }
  return request({
    url: '/organization/community/changeStatus',
    method: 'put',
    data: data
  })
}
